package com.lz.service;

import com.lz.entity.CartQuery;
import com.lz.entity.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

/**
 * 产品信息service
 * Created by lz on 2018/8/10.
 */
public interface ProductInfoService {

    ProductInfo findOne(String id);

    List<ProductInfo> findUpAll();

    Page<ProductInfo> findAll(Pageable pageable);

    ProductInfo save(ProductInfo productInfo);

    //加库存
    void increaseStock(List<CartQuery> cartQueryList);

    //扣库存
    void decreaseStock(List<CartQuery> cartQueryList);
}
